/* 
 * Jupiter OJ - User Layout Stylesheet
 * 简洁高雅的用户界面设计
 */

/* 基础变量 */
:root {
  --primary-color: #1890ff;
  --success-color: #389e0d;
  --danger-color: #f5222d;
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-tertiary: rgba(0, 0, 0, 0.45);
  --bg-white: #ffffff;
  --bg-light: #f5f7fa;
  --border-radius: 4px;
  --box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  --transition-duration: 0.3s;
}

/* 整体布局 */
.user-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-light);
  color: var(--text-primary);
}

/* 顶部导航 */
.header.light-header {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px;
  background-color: var(--bg-white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.light-header .logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-right: 32px;
  letter-spacing: 0.5px;
}

/* 导航菜单 */
.light-header .nav-menu {
  flex: 1;
  background: transparent;
  border-bottom: none;
  line-height: 64px;
  height: 64px;
  display: flex;
  align-items: center;
}

/* 导航菜单项样式覆盖 */
.light-header .ant-menu {
  background: transparent !important;
  border-bottom: none !important;
  display: flex;
  align-items: center;
}

.light-header .ant-menu-item {
  display: flex;
  align-items: center;
  height: 64px;
  line-height: 64px;
}

/* 菜单链接样式 */
.menu-link {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  transition: color var(--transition-duration);
  font-size: 16px;
  height: 100%;
}

.menu-link span {
  margin-left: 8px;
}

.menu-link .anticon {
  font-size: 18px;
}

.ant-menu-item-selected .menu-link {
  color: var(--primary-color);
}

.ant-menu-item:hover .menu-link {
  color: var(--primary-color);
}

/* 修复菜单文字不可见问题 */
.light-header .ant-menu-item a {
  color: var(--text-secondary);
}

.light-header .ant-menu-item-selected a {
  color: var(--primary-color);
}

.light-header .ant-menu-item:hover a {
  color: var(--primary-color);
}

.light-header .ant-menu-horizontal > .ant-menu-item,
.light-header .ant-menu-horizontal > .ant-menu-submenu {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-duration), 
              border-color var(--transition-duration);
}

.light-header .ant-menu-horizontal > .ant-menu-item:hover,
.light-header .ant-menu-horizontal > .ant-menu-submenu:hover {
  color: var(--primary-color);
  border-bottom: 2px solid transparent;
}

.light-header .ant-menu-horizontal > .ant-menu-item-selected,
.light-header .ant-menu-horizontal > .ant-menu-submenu-selected {
  color: var(--primary-color);
  font-weight: 500;
  border-bottom: 2px solid var(--primary-color);
}

/* 覆盖Ant Design默认的::after伪元素，防止双重底部边框 */
.light-header .ant-menu-horizontal > .ant-menu-item::after,
.light-header .ant-menu-horizontal > .ant-menu-submenu::after {
  display: none !important;
}

/* 右侧用户区域 */
.header-right {
  display: flex;
  align-items: center;
}

/* 登录注册按钮 */
.login-btn, .register-btn {
  font-size: 15px;
  font-weight: 600;
  height: 36px;
  border-radius: 6px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  color: white;
}

.login-btn {
  background-color: #52c41a;  /* 浅绿色 */
  border: none;
}

.login-btn:hover, .login-btn:focus {
  background-color: #73d13d !important;
  border: none !important;
  box-shadow: 0 4px 8px rgba(82, 196, 26, 0.25) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.register-btn {
  background-color: #40a9ff;  /* 浅蓝色 */
  border: none;
  color: white;
}

.register-btn:hover, .register-btn:focus {
  background-color: #69c0ff !important;
  border: none !important;
  box-shadow: 0 4px 8px rgba(64, 169, 255, 0.25) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.login-btn .anticon, .register-btn .anticon {
  margin-right: 6px;
  font-size: 18px;
}

/* 用户下拉菜单 */
.user-dropdown {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color var(--transition-duration);
}

.user-dropdown:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.username-light {
  margin-left: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 通知按钮 */
.header-right .ant-btn {
  color: var(--text-secondary);
  transition: color var(--transition-duration);
}

.header-right .ant-btn:hover {
  color: var(--primary-color);
  background-color: transparent;
}

/* 内容区域 */
.content {
  flex: 1;
  padding: 16px 24px 24px;
}

.content-container {
  background-color: var(--bg-white);
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  min-height: 280px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header.light-header {
    padding: 0 16px;
  }
  
  .light-header .logo {
    margin-right: 16px;
    font-size: 20px;
  }
  
  .content {
    padding: 16px;
  }
  
  .content-container {
    padding: 16px;
  }
  
  .username-light {
    display: none;
  }
  
  .light-header .ant-menu-horizontal > .ant-menu-item,
  .light-header .ant-menu-horizontal > .ant-menu-submenu {
    margin: 0 2px;
    padding: 0 8px;
    font-size: 15px;
  }
  
  .menu-link .anticon {
    font-size: 16px;
  }
  
  .login-btn, .register-btn {
    padding: 0 12px;
    font-size: 13px;
  }
}

.breadcrumb-container {
  padding: 4px 50px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid #f0f0f0;
}
